1. Field of the Invention
The present invention relates to a variable bit rate video encoding apparatus for use in recording compressed encoded video data on a recording medium such as an optical or magnetic disk, or in transmitting the same through a variable bit rate transmitting system. It also relates to a video recording apparatus for recording the encoded video data on the recording medium and to a recording medium on which the encoded video data are recorded.
2. Description of Prior Art
A transform encoding method is widely known for encoding a video signal, in which an image of the video signal is divided into blocks and each block comprising a given number of neighbor pixels is subjected to an orthogonal transform process such as discrete cosign transform. In the transform encoding method, a transform factor is quantized with a predetermined quantizing step width and subjected to compression encoding such as variable length encoding or Huffman encoding.
It is also known that a motion video data such as a television signal is encoded by an interframe encoding where a difference between frames is examined. In the interframe encoding, a target frame to be encoded is predicted by using a time preceding or succeeding frame called a reference frame for producing a prediction error signal. The prediction error signal is then encoded before being transmitted or recorded. An interframe prediction is carried out for each block of the given number of pixels and a motion data of the block is transmitted or recorded together with the prediction error signal.
Those steps are based on variable length encoding and an amount of generated bits are only identified after completion of encoding process. For maintaining the generated bits within a range of bit allocation, the generated bits are compared with an amount of allocated bits. A result of a comparison is used for updating a bit allocation, which is known as a feed-forward control method.
There are also developed a variety of methods of controlling the amount of the generated bits of variable length encoded data efficiently to be equal or close to a target amount, for example, by estimating a quantizing step width appropriate for making the amount of the allocated bits as close as possible to the target amount (See Japanese Patent Laid-open Applications 4-91586(1992), 5-227520(1993), and 6-197329(1994)).
It is essential in any of prescribed cases to control the amount of coding bits within an encoder so that an input buffer memory in a playback apparatus is not overflowed with data when a transmission rate of the coding bits for communications and broadcasting is constant.
Also, a difficulty of compression encoding a video signal is varied depending on its time or spatial dependent data size and when the video signal is encoded at a fixed bit rate, quality reproduction will hardly be maintained. In view of the fact that a video signal with a higher degree of a coding difficulty is more likely to deteriorate, some methods of encoding at a variable bit rate have been developed. Such methods should be associated with variable bit rate transmission methods which use optical disks or magnetic disks. Most of the variable bit rate encoding methods allow a quantizing step width for quantization to be fixed to a constant value for maintaining a quality of a reproduced image. There is provided another variable bit rate encoding method in which the quantizing step width is varied according to a motion in the image (Japanese Patent Laid-open Application 6-86264 (1994)).
It is also proposed to determine the amount of the allocated coding bits for a video signal depending on an available storage area of a given recording medium when recording the video signal on the recording medium (Japanese Patent Laid-open Application 6-55536(1994)). More particularly, the video signal is encoded by a primary encoding circuit to yield the amount of the generated bits and the amount of the allocated coding bits is determined by the generated bits. Using the allocated coding bits, the video signal is encoded again. The above procedure includes two encoding actions.
A quick real-time encoding technique may not be needed for recording a video signal on a read-only medium such as an optical recording disk. When a rewritable recording medium is used, the quick real time encoding technique is essential. Also, it is necessary to carry out the encoding with a bit rate not exceeding a maximum of a transmission bit rate for recording or reproducing. If the video signal has a balance of the coding difficulty exceeded in the variable bit rate encoding, its segment with a lower coding difficulty will be encoded at an excessively low bit rate thus declining in the quality when reproduced. In real-time encoding of the video signal with a variable bit rate for recording, it is desired for increasing the efficiency to calculate the amount of the allocated coding bits by considering the available storage area of the recording medium.